package ru.eas.fibonachi;

import java.util.Scanner;

/**
 * @author aesipov
 */
public class Fibonachi2 {
    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(fib2(n));
    }

    private static long fib2(int n) {
        long[] array = new long[n + 1];
        array[0] = 0;
        array[1] = 1;
        for (int i = 2; i < array.length; i++) {
            array[i] = array[i - 1] + array[i - 2];
        }
        return array[n];
    }
}
